﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using Lamex.Library;
using Lamex.Interface;
using Lamex.Library.CommonClass;

namespace Lamex.mSchedule.UI
{
    public partial class frmSCH_Main : frmModuleBase
    {
        public frmSCH_Main()
        {
            InitializeComponent();
            menuStrip1.Text = ModuleNames.mSchedule; //与AssemblyModuleEntry.ModuleName定义相同
        }
        public override MenuStrip GetModuleMenu()
        {
            return this.menuStrip1;
        }

        private void menuSCH_Scan_Click(object sender, EventArgs e)
        {
             MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmMES_BarcodeScanner), sender as ToolStripMenuItem);       
        }

        private void menuSCH_Click(object sender, EventArgs e)
        {

        }

        private void menuSCH_ScanFollowUp_Click(object sender, EventArgs e)
        {
            //MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(FrmDataCollection), sender as ToolStripMenuItem);
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new FrmDataCollection("S08"), sender as ToolStripMenuItem);
            //FrmDataCollection frm = new FrmDataCollection();
            //frm.ShowDialog();
        }

        private void menuSCH_Owed_Analysis_Overall_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmSCH_Owed_Analyze_Overall), sender as ToolStripMenuItem);
        }

        private void menuSCH_Owed_Analysis_SubFactory_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmSCH_Owed_Analyze_SubFactory), sender as ToolStripMenuItem);
        }

        private void menuSCH_Owed_Location_Click(object sender, EventArgs e)
        {
            //MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmSCH_Position_Search), sender as ToolStripMenuItem);
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmSCH_Position_Search_Table), sender as ToolStripMenuItem);
        }

        private void menuSCH_Owed_QTY_List_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("View_OP_Follow_Owed_QTY", 0, false, false), sender as ToolStripMenuItem);
        }

        private void menuSCH_Production_Task_Click(object sender, EventArgs e)
        {
            //OP_MO_Revised_List
        }

        private void menuSCH_Order_Revised_List_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("OP_MO_Revised_Order_QTY", 0, true, false), sender as ToolStripMenuItem);
        }

        private void menuSCH_Internal_Order_Order_Confirm_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmSCH_Internal_Order_Confirm), sender as ToolStripMenuItem);
        }
    }
}